package com.infosys.newSimpleInvertedIndex.models;

import java.util.List;

import com.google.common.base.Preconditions;

public class Portfolio {
    private List<ParsedDoc> parsedDocuments;

    public Portfolio(List<ParsedDoc> parsedDocuments) {
        /** LESSON: */
        // throw exception NullPointerException under empty parsedDocuments
        Preconditions.checkNotNull(parsedDocuments);
        // throw IllegalStateException under parsedDocuments is empty
        Preconditions.checkState(!parsedDocuments.isEmpty());
        this.parsedDocuments = parsedDocuments;
    }

    public List<ParsedDoc> getParsedDocuments() {
        return this.parsedDocuments;
    }

    public void setParsedDocuments(List<ParsedDoc> parsedDocuments) {
        this.parsedDocuments = parsedDocuments;
    }

    public int size() {
        return this.parsedDocuments.size();}

}
